package homework11;

public class Director {
    private ComputerDesign design;

    public void setComputerDesign(ComputerDesign design) {
        this.design = design;
    }
    public void createComputer(){
        design.setCpu();
        design.setHardDisk();
        design.setKeyBoard();
        design.setMemory();
        design.setMouse();
    }

    public ComputerDesign getDesign() {
        return design;
    }

    public static void main(String[] args) {
        Director director = new Director();
        director.setComputerDesign(new Notebook());
        director.createComputer();
        Computer computer  = director.getDesign().build();
        System.out.println(computer);
    }
}
